package cn.wk.client;

import cn.wk.domain.CourseDoc;
import cn.wk.query.CourseDocQuery;
import cn.wk.util.AjaxResult;
import cn.wk.util.PageList;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "SEARCH-SERVICE",fallbackFactory = CourseDocFallbackFactory.class)
@RequestMapping("/courseSearch")
public interface CourseDocClient {

    @PostMapping("/addOrUpdate")
    AjaxResult addOrUpdate(@RequestBody CourseDoc courseDoc);

    @DeleteMapping("/offCourse/{id}")
    AjaxResult del(@PathVariable("id") Long courseId);

    @PostMapping("/courseDocQuery")
    PageList<CourseDoc> queryCourse(@RequestBody CourseDocQuery courseDocQuery);
}
